package com.freecat.xmqgct.mvp.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.freecat.xmqgct.R;


public class AttendInfoAdapter extends BaseAdapter {
    private Context context;
    private int type;

    public AttendInfoAdapter(Context context, int type) {
        this.context = context;
        this.type = type;
    }


    @Override
    public int getCount() {
        return 3;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }


    @Override
    public View getView(final int position, View convertView, ViewGroup parent) {
        final ViewHolder holder;
        if (convertView == null) {
            convertView = LayoutInflater.from(context).inflate(R.layout.item_attendinfo, parent, false);
            holder = new ViewHolder();
            holder.name = convertView.findViewById(R.id.tv_name);

            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
        if (type == 0) {
            holder.name.setText("勘察单位");
        } else {
            holder.name.setText("劳务单位");
        }

        return convertView;
    }


    private class ViewHolder {
        TextView name;

    }


}